# -*- coding: utf-8 -*-
from models import Post
from utils.template import respond
from django.utils.cache import get_cache_key


def index(request):
    cache_key = get_cache_key(request,'')
    post_list = Post.objects.all().order('-published')[:5] #lista 5 ultimas ordenados por data
    return respond(request,'gtug/index.html', {'posts': post_list})